package com.duobaoyu.dby.supply.biz.client.resource.bean.bo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * @author liyang
 * @version 1.0.0
 * @ClassName PrefreightConfigBO
 * @createTime 13:01:00 2023/10/11
 */
@Data
public class PrefreightConfigBO implements Serializable {
    private static final long serialVersionUID = 6391558665222702237L;

    /**
     * 渠道编码
     */
    @ApiModelProperty(value = "渠道编码")
    private String channelCode;
    /**
     * 配置类型 1->预估运费配置；2->售后配置；3->审核策略配置；4->订单规则配置
     * //@see ChannelSettingTypeEnum
     */
    @ApiModelProperty(value = "配置类型 1->预估运费配置；2->售后配置；3->审核策略配置；4->订单规则配置")
    private Integer configType;
    /**
     * 预估运费配置
     */
    @ApiModelProperty(value = "预估运费配置")
    private Prefreight prefreight;

    @Data
    public static class Prefreight {
        /**
         * 运费条件1:订单金额
         */
        @ApiModelProperty(value = "运费条件1:订单金额")
        private Integer freightFilter;
        /**
         * 运费配置json
         */
        @ApiModelProperty(value = "运费配置json")
        private List<PrefreightParam> freightParam;
        /**
         * 计费方式: 1:区间计费
         */
        @ApiModelProperty(value = "计费方式: 1:区间计费")
        private Integer freightWay;

        /**
         * 预估运费设置
         */
        @Data
        public static class PrefreightParam {
            /**
             * 开始金额
             **/
            @ApiModelProperty(value = "开始金额")
            private BigDecimal startValue;
            /**
             * 结束金额
             */
            @ApiModelProperty(value = "结束金额")
            private BigDecimal endValue;
            /**
             * 预估运费
             */
            @ApiModelProperty(value = "预估运费")
            private BigDecimal freightValue;
            /**
             * 预估运费
             */
            @ApiModelProperty(value = "预估运费")
            private Integer isSort;
        }
    }
}
